//
//  YGExpertsListTableViewCell.m
//  yuanshangyiliao
//
//  Created by icholab on 2021/4/10.
//

#import "YGExpertsListTableViewCell.h"
#import "YGExpertsListView.h"

@interface YGExpertsListTableViewCell ()

@property (nonatomic, strong) YGExpertsListView *expertsListView;



@end

@implementation YGExpertsListTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
        [self initconstraints];
    }
    return self;
}

-(void)initView{
    [self addSubview:self.expertsListView];
}

-(void)initconstraints{
    [self.expertsListView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.contentView.mas_top);
            make.left.mas_equalTo(self.contentView.mas_left).offset(10);
            make.right.mas_equalTo(self.contentView.mas_right).offset(-10);
        make.height.mas_equalTo(self.contentView.mas_height);
    }];
}

- (void)configuraDataWith:(YGExpertMsgModel *)model{
    if (model) {
        [self.expertsListView updateExpertsListDataWith:model];
    }
}

#pragma setter
- (YGExpertsListView *)expertsListView{
    if (!_expertsListView) {
        _expertsListView = [[YGExpertsListView alloc]init];
    }
    return _expertsListView;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
